package cn.getech.data.development.api;

import cn.getech.data.development.dto.JobCronDto;
import cn.getech.data.development.dto.JobRestDto;
import cn.getech.data.development.entity.WorkMenu;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @ClassName WorkMenuApi
 * @Description TODO
 * @Author Getech
 * @Date 2020/12/23 10:46
 */

public interface WorkMenuApi {

    @RequestMapping(value = "/api/dataBdp/workMenu/getCronTypeByJobId",method = RequestMethod.GET)
    JobCronDto getCronTypeByJobId(@RequestParam("jobInfoId") Integer jobInfoId);

    @RequestMapping(value = "/api/dataBdp/workMenu/getCronTypeByDepId",method = RequestMethod.GET)
    JobCronDto getCronTypeByDepId(@RequestParam("jobDepId") Integer jobDepId);

    @RequestMapping(value = "/api/dataBdp/workMenu/getJobLayOozieId",method = RequestMethod.GET)
    String getJobLayOozieId(@RequestParam("workMenuDepId") Long workMenuDepId);

    @RequestMapping(value = "/api/dataBdp/workMenu/syncRunWorkJob",method = RequestMethod.POST)
    String syncRunWorkJob(@RequestBody JobRestDto jobRestDto);

    @RequestMapping(value = "/api/dataBdp/workMenu/getById",method = RequestMethod.GET)
    WorkMenu getById(@RequestParam("workMenuId") Long workMenuId);
}
